/*
 * @Author: your name
 * @Date: 2021-04-01 16:38:05
 * @LastEditTime: 2021-04-01 16:55:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \web\node\models\index.js
 */
import mongoose from "mongoose"

mongoose.connect("mongodb://localhost/teach",{useNewUrlParser:true,useUnifiedTopology: true});

mongoose.connection.on("open",()=>{
    console.log("数据库连接成功！")
})
mongoose.connection.on("err",()=>{
    console.log("数据库链接失败！")
})